.TH WATCHDOG "1" "November 2014" "watchdog" "User Commands"
.SH NAME
watchdog - Watchdog program for services
.SH SYNOPSIS
.TP
.B watchdog [options] [commands]
[\fI--args arguments\fR] 
[\fI--console\fR] 
[\fI--daemon\fR]
[\fI--heartBeat interval\fR]
[\fI--home directory\fR]
[\fI--log logFile:level\fR]
[\fI--name Service name\fR]
[\fI--pidfile path\fR]
[\fI--program Service program\fR]
.SH DESCRIPTION
The watchdog program is used to configure the running of system services (daemons).
Watchdog provides a generic way to install/uninstall, enable/disable, start/stop, and run a service, regardless
of the operating system. When used to run a service, it starts the service and then watches over it, to restart it 
should it fail. Watchdog also provides general management commands to enable, disable, start, and stop appweb. 
.SH COMMANDS
.TP
\fBdisable\fR
Disable the service from automatically starting when the system is booted.
.TP
\fBenable\fR
Enable the service to start automatically on system boot.
.TP
\fBinstall\fR
Install the service.
.TP
\fBrun\fR
Run the service and monitor its execution. Watchdog will automatically restart the service should it fail. 
Watchdog will block unless it is invoked with --daemon.
.TP
\fBstart\fR
Start the service.
.TP
\fBstop\fR
Stop the service.
.TP
\fBuninstall\fR
Uninstall the service.
.SH OPTIONS
.TP
\fB\--args arguments\fR
Arguments to use for the service program command line when it starts.
.TP
\fB\--console\fR
Windows specific option to allow the watchdog process to interact with the users desktop.
.TP
\fB\--daemon\fR
Run the watchdog as a daemon process. This causes the watchdog to detach from the current shell and run in the background.
.TP
\fB\--heartBeat interval\fR
Windows specific option to set the frequency in seconds for the watchdog to check on service. 
This period should be short enough that the service will
be quickly restarted should it fail, but not so short that the watchdog process consumes significant CPU resources.
If the service dies more than 30 times per hour, the watchdog will suspend restarting the service.
.TP
\fB\--home directory\fR
Set the home directory in which to start the service.
.TP
\fB\--log logFile:level\fR
Specify a file to use for log messages. The level argument defines the message verbosity. Zero is the least and 9 is the 
most verbose.
.TP
\fB\--retries count\fR
Number of times to restart the service per hour.
.TP
\fB\-v\fR
Output the product version number.
.PP
.SH "REPORTING BUGS"
Report bugs to dev@embedthis.com.
.SH COPYRIGHT
Copyright \(co Embedthis Software.
.br
.SH "SEE ALSO"
appweb
